/* 引入Vue */
import Vue from "vue"
/* 引入Vuex   指令:yarn add vuex*/
import Vuex from "vuex"
/* 使用Vuex */
Vue.use(Vuex)

const state = {}
const mutations = {}
const actions = {}
const getters = {}

import home from "./modules/home"
import search from "./modules/search"
import detail from "./modules/detail"
import shopCart from "./modules/shopCart"
import user from "./modules/user"
import trade from "./modules/trade"
export default new Vuex.Store({
    state,
    mutations,
    actions,
    getters,
    /* modules中的vuex */
    modules: {
        home,
        search,
        detail,
        shopCart,
        user,
        trade
    }
})